package com.kfm.pm;

public class GirlFriend {

    // girlFriend
    // 女朋友的字段
    String name;
    int age;
    int height;
    double weight;
    String gender = "女";

    // 女朋友的方法
    public void money() {
        System.out.println(name + "花钱！");
    }

    public void makeMoney() {
        System.out.println(name + "赚钱！");
    }

    public void makeUp() {
        System.out.println(name + "化妆！");
    }

    public void info() {
        System.out.println("俺叫" + name + "，今年" + age + "岁，身高" + height + "，体重" + weight + "KG");
    }

    public static void main(String[] args) {
        // 构建对象   引用（数组、类、枚举、接口）
        GirlFriend gf = new GirlFriend();
        gf.gender = "未知";
        System.out.println(gf.gender);
        gf.name = "贺秀莲"; // 对象名.字段   获取对象字段的值
        gf.age = 23;
        gf.height = 165;
        gf.weight = 55;
        gf.money();        // 对象.方法名()  调用对象的方法
        gf.info();
        System.out.println(gf.name);

        GirlFriend gf_copy = gf;
        int[] arr = new int[5];
        int[] arr_copy = arr;
        arr_copy[0] = 4;
        System.out.println(arr[0]); // 4
        gf_copy.name = "秀莲儿";
        System.out.println(gf.name); // 秀莲儿"

//        // 构建对象
//        GirlFriend gf1 = new GirlFriend();
//        gf1.name = "迪丽热巴"; // 对象名.字段   获取对象字段的值
//        gf1.age = 31;
//        gf1.height = 170;
//        gf1.weight = 45;
//        gf1.money();        // 对象.方法名()  调用对象的方法
//        gf1.info();
//        System.out.println(gf1.name);



    }

}

class Friend {

}
